<!-- 查看API模态框 -->
<div class="modal fade" id="viewModal" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-xl">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="viewModalLabel">查看API</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <div class="row mb-3">
                    <div class="col-md-6">
                        <h5>API名称</h5>
                        <p id="view-api-name"></p>
                    </div>
                    <div class="col-md-3">
                        <h5>请求方法</h5>
                        <p id="view-api-method"></p>
                    </div>
                    <div class="col-md-3">
                        <h5>标签</h5>
                        <p id="view-api-tags"></p>
                    </div>
                </div>
                
                <div class="mb-3">
                    <h5>请求路径</h5>
                    <p id="view-api-path"></p>
                </div>
                
                <div class="mb-3">
                    <h5>描述</h5>
                    <p id="view-api-description"></p>
                </div>
                
                <ul class="nav nav-tabs" id="viewApiTabs" role="tablist">
                    <li class="nav-item" role="presentation">
                        <button class="nav-link active" id="view-headers-tab" data-bs-toggle="tab" data-bs-target="#view-headers-tab-pane" type="button" role="tab" aria-controls="view-headers-tab-pane" aria-selected="true">请求头</button>
                    </li>
                    <li class="nav-item" role="presentation">
                        <button class="nav-link" id="view-params-tab" data-bs-toggle="tab" data-bs-target="#view-params-tab-pane" type="button" role="tab" aria-controls="view-params-tab-pane" aria-selected="false">请求参数</button>
                    </li>
                    <li class="nav-item" role="presentation">
                        <button class="nav-link" id="view-body-tab" data-bs-toggle="tab" data-bs-target="#view-body-tab-pane" type="button" role="tab" aria-controls="view-body-tab-pane" aria-selected="false">请求体</button>
                    </li>
                    <li class="nav-item" role="presentation">
                        <button class="nav-link" id="view-response-tab" data-bs-toggle="tab" data-bs-target="#view-response-tab-pane" type="button" role="tab" aria-controls="view-response-tab-pane" aria-selected="false">响应</button>
                    </li>
                </ul>
                
                <div class="tab-content p-3 border border-top-0 rounded-bottom" id="viewApiTabsContent">
                    <div class="tab-pane fade show active" id="view-headers-tab-pane" role="tabpanel" aria-labelledby="view-headers-tab" tabindex="0">
                        <div id="view-api-headers"></div>
                    </div>
                    <div class="tab-pane fade" id="view-params-tab-pane" role="tabpanel" aria-labelledby="view-params-tab" tabindex="0">
                        <div id="view-api-params"></div>
                    </div>
                    <div class="tab-pane fade" id="view-body-tab-pane" role="tabpanel" aria-labelledby="view-body-tab" tabindex="0">
                        <div id="view-api-body"></div>
                    </div>
                    <div class="tab-pane fade" id="view-response-tab-pane" role="tabpanel" aria-labelledby="view-response-tab" tabindex="0">
                        <div id="view-api-response"></div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>